package edu.sctu.nieyu.day20150510.constructor.texttwo;

/**
 * Created by user01 on 2015/5/10.
 */
public class OutputInfo {
   public StudentMessage studentMessage;
    public void getMessage(StudentMessage studentMessage){
        if (studentMessage.getAge()>18){
           System.out.println("姓名："+studentMessage.getName()+"\n"+"年龄："+studentMessage.getAge()+"\n"+"学号："
                   +studentMessage.getNumber()+"\n"+"性别："+studentMessage.getSex());
       }
       else {
           System.out.println("未成年");
       }
    }


    }

